package com.yunxin.core.wechat.enumpack;

import com.yunxin.common.base.IBaseEnum;
import lombok.Getter;

import java.util.EnumSet;

//微信客户来源
@Getter
public enum AddWayEnum implements IBaseEnum<Integer> {

    unknown(0, "未知来源"),
    qr_code(1, "扫描二维码"),
    phone_number(2, "搜索手机号"),
    calling_card(3, "名片分享"),
    ABOVE_NO6MONTH(4, "群聊"),
    group_chat(5, "手机通讯录"),
    wechat_contacts(6, "微信联系人"),
    customer_service(8, "安装第三方应用时自动添加的客服人员"),
    mailbox(9, "搜索邮箱"),
    video_channel(10, "视频号添加"),
    schedule(11, "通过日程参与人添加"),
    meeting(12, "通过会议参与人添加"),
    enterprise_weChat(13, "添加微信好友对应的企业微信"),
    exclusive(14, "通过智慧硬件专属客服添加"),
    visit(15, "通过上门服务客服添加"),
    customer_link(16, "通过获客链接添加"),
    customization(17, "通过定制开发添加"),
    demand(18, "通过需求回复添加"),
    share(201, "内部成员共享"),
    reserved_funds(202, "管理员/负责人分配");


    private final Integer value;

    private final String label;

    AddWayEnum(Integer value, String label) {
        this.value = value;
        this.label = label;
    }

    public static  String getLabelByValue(Integer value){
        for (AddWayEnum addWayEnum : AddWayEnum.values()) {
            if (addWayEnum.getValue().intValue()==value) {
                return addWayEnum.getLabel();
            }
        }
        return null;
    }

}
